package cn.ruituo.adv4;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ReadFile {
    public static void main(String[] args) {
        FileInputStream fin = null;
        try {
            fin = new FileInputStream("E:\\temp\\java72-java\\README.md");
            int ch = 0;
            while((ch=fin.read())>-1){//二合一
                System.out.println(ch+" "+((char)ch));
            }
            //ch = fin.read();
           // System.out.println((char) ch);

        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (fin != null)
                    fin.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
